agent: add basic rules for agents#10586
agent: add basic rules for agents#10586lgirdwood wants to merge 4 commits intothesofproject:mainfrom
Conversation
Add some initial and basic rules for agents to use when performing work on the codebase. These can be expanded and improved as agents improve. This includes a --help needed in sdk-config for agent use. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
There was a problem hiding this comment.
Pull request overview
Adds initial agent-oriented workflows/rules and improves the module creation script with a --help usage message to support agent ergonomics.
Changes:
- Added
--helphandling and normalized the usage string insdk-create-module.py. - Introduced new agent workflows for module development and build/validation.
- Added agent rules for documentation standards and commit message/sign-off format.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/sdk-create-module.py | Adds --help output and standardizes usage text for the module creation script |
| .agent/workflows/module_development.md | New workflow instructions for creating and validating a module |
| .agent/workflows/build_and_validate.md | New workflow instructions for building and validating C features |
| .agent/rules/documentation.md | New rules describing expected Doxygen/documentation practices |
| .agent/rules/commit_style.md | New rules defining commit message format and sign-off expectations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if len(sys.argv) == 2 and sys.argv[1] in ['-h', '--help']: | ||
| print("Usage: sdk-create-module.py <new_module_name>") | ||
| sys.exit(0) | ||
| elif len(sys.argv) != 2: | ||
| print("\n[ERROR] Invalid number of arguments.") | ||
| print("Usage: sdk_create_module.py <new_module_name>") | ||
| print("Usage: sdk-create-module.py <new_module_name>") |
There was a problem hiding this comment.
The usage text hard-codes the script name. If the script is renamed, invoked via a symlink, or run as python scripts/sdk-create-module.py, the printed usage can become misleading. Prefer building the usage string from os.path.basename(sys.argv[0]) (or similar) so it always matches the invoked command.
Make email generic Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Liam Girdwood <lgirdwood@gmail.com>
Indent fenced code block. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Liam Girdwood <lgirdwood@gmail.com>
indent fenced code block Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Liam Girdwood <lgirdwood@gmail.com>
abonislawski
left a comment
There was a problem hiding this comment.
Very cool! A true sign of the times :)
However, I see 2 potential issues here:
- Written for humans: some instructions are written in a very natural, human-like language. Since SOF is a large project, the documentation for agents could potentially grow huge over time. We should focus on short, direct, and more "robotic" instructions right from the start (using strict commands, removing filler words to save context window tokens and improve the agent's accuracy).
- It lacks a basic one-liner project description.
| description: Build and validate new C code features | ||
| --- | ||
|
|
||
| This workflow describes the process for building and validating any new C code features in the SOF repository. |
There was a problem hiding this comment.
Example:
This workflow describes the process for building and validating any new C code features in the SOF repository.
Note: The QEMU build targets must be used for both building and testing.
USE THIS to build/test C code. REQUIREMENT: Always use QEMU targets.
There was a problem hiding this comment.
English is fine, I has the same thought but I asked the agent to craft these. So far so good, but we will need to get something that works with most agents.
Add some initial and basic rules for agents to use when performing work on the codebase. These can be expanded and improved as agents improve.
This includes a --help needed in sdk-config for agent use.